package cn.wolfcode.service;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.domain.Role;
import cn.wolfcode.qo.QueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface IEmployeeService {
    void insert(Employee employee);
    void delete(Long id);
    void update(Employee employee);
    Employee get(Long id);
    List<Employee> listAll();
    //分页功能
    PageInfo<Employee> query(QueryObject qo);

    List<Role> queryRoles(Long id);

    Employee checkLogin(String username, String password);

    void updatePassword(Long id, String password_new);

    List<String> getAllPermission(Long id);

    //导出方法
    Workbook exportXls();

    void importXls(MultipartFile file) throws IOException;

    Employee selectByUsername(String username);

    void changeStatus(boolean status, Long id);
}
